<template>
	<div class="about">
		<input type="text" v-model="mobile" />
		<input type="text" v-model="password" />
		<button @click="login">登陆</button>
	</div>
</template>
<script>
	// import  * as auth from '@/utils/auth'
	export default {
		data() {
			return {
				mobile: '',
				password: ''
			}
		},
		methods: {
			login() {
				this.$http.post(
						'/addons/yun_shop/api.php?i=1&uuid=0&type=5&mid=214578469&version=v1.1.137&scope=pass&route=member.login.index', {
							mobile: this.mobile,
							password: this.password,
							captcha: "",
							is_sms: 0,
							mid: "1161",

							mobileErr: "",

							passwordErr: "",
							uuid: 0
						}
					)
					.then(response => {
						console.log(response)
						if(response.result==1){
							this.$auth.setAdminInfo(response.msg)
							this.$router.push('/')
						}else{
							alert(response.msg)
						}
						
						// 处理响应数据
					})
					.catch(error => {
						// 处理错误
						console.log(error)
					});
			}
		}
	}
</script>